import strutils
proc toRna*(dna: string): string = 
  if not dna.allCharsInSet({'C', 'G', 'T', 'A'}):
    raise newException(ValueError, "invalid nucleotide")
  dna.multiReplace(("C", "G"),("G", "C"), ("T", "A"), ("A", "U"))